package com.example.demo.controller;/**
 * @author Daog
 * @create 2020 -11 -2020-11-02 20:30
 * @description 功能描述
 */

import com.example.demo.bean.TestUser;
import com.example.demo.bean.UserBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: demo_boot
 *
 * @description:
 *
 * @author: Dong
 *
 * @create: 2020-11-02 20:30
 **/
@RestController
@EnableConfigurationProperties({UserBody.class})
public class HelloControllerBean {

    @Autowired
    UserBody userbody;

    @Autowired
    TestUser testUser;


    @GetMapping("/getUser")
    public String getUser(){
        return userbody.toString();
    }

    @GetMapping("/gettestuser")
    public String gettestUser() {
        return testUser.toString();
    }


}
